<html>
<head><meta charset="utf-8"><title>The crates.io error message about expired toekns is bad · t-infra · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/index.html">t-infra</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html">The crates.io error message about expired toekns is bad</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205429042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429042">(Jul 30 2020 at 00:17)</a>:</h4>
<p>Tried to <code>cargo publish</code> now. Got this:</p>
<blockquote>
<p>error: api errors (status 401 Unauthorized): The given API token does not match the format used by <a href="http://crates.io">crates.io</a>. Tokens generated before 2020-07-14 were generated with an insecure random number generator, and have been revoked. You can generate a new token at <a href="https://crates.io/me">https://crates.io/me</a>. For more information please see <a href="https://blog.rust-lang.org/2020/07/14/crates-io-security-advisory.html">https://blog.rust-lang.org/2020/07/14/crates-io-security-advisory.html</a>. We apologize for any inconvenience.</p>
</blockquote>
<p>Well its all cool and tells how to regen the token. But neither the blog post, nor <code>cargo publish</code> itself tells how to actually get it to use the new token.</p>



<a name="205429185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429185">(Jul 30 2020 at 00:19)</a>:</h4>
<p><code>cargo login</code>?</p>



<a name="205429205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429205">(Jul 30 2020 at 00:19)</a>:</h4>
<p>But seems like something we should fix in docs!</p>



<a name="205429350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429350">(Jul 30 2020 at 00:20)</a>:</h4>
<p>Looks like actually generating the token also displays the <code>cargo login</code> command. But I do definitely remember the flow being significantly more friendly on the first use.</p>



<a name="205429365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429365">(Jul 30 2020 at 00:20)</a>:</h4>
<p>Maybe its just me though.</p>



<a name="205429381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/205429381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#205429381">(Jul 30 2020 at 00:20)</a>:</h4>
<p>I made a note in the crates io team's channel on Discord</p>



<a name="206023992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/206023992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#206023992">(Aug 05 2020 at 13:50)</a>:</h4>
<p>For me, when I generated the new token it showed a <code>cargo login</code> command that I copy-pasted</p>



<a name="206024029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/The%20crates.io%20error%20message%20about%20expired%20toekns%20is%20bad/near/206024029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/The.20crates.2Eio.20error.20message.20about.20expired.20toekns.20is.20bad.html#206024029">(Aug 05 2020 at 13:50)</a>:</h4>
<p>I think that's about the same as what happened a  year or so ago when I did this the first time</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>